package com.application.viewmodel;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

public class MainViewModel extends ViewModel {
    public final MutableLiveData<String> signature=new MutableLiveData<>("把烦恼揉成纸团扔进风里，剩下的日子，只收集云朵和星光");
    public void changeSignature(){
        signature.setValue("像风翻书一样翻过大好时光，每一页都藏着不期而遇的光");
    }
    protected MutableLiveData<String> loginUserName=new MutableLiveData<>();
    protected MutableLiveData<String> toastText=new MutableLiveData<>();

    public MutableLiveData<String> getLoginUserName() {
        return loginUserName;
    }

    public void setLoginUserName(String userName) {
        loginUserName.setValue(userName);
    }
    public MutableLiveData<String> getToastText(){
        return toastText;
    }
    public void showToast(String text){
        toastText.setValue(text);
    }
    public void updateMineFragmentData(){

        showToast("更新个人中心数据");
    }

}
